package com.demo.java.gateway;

import java.util.Arrays;

/**
 * 简单业务网关实现, 包含四个模块: server模块, route模块, http模块, filter模块
 * 参考: https://zhuanlan.zhihu.com/p/488210796
 */
public class ApiGatewayServer {
    public static void main(String[] args) {
        int proxyPort = 8808;

        String proxyServers = "http://localhost:8080";

        HttpInboundServer server = new HttpInboundServer(proxyPort, Arrays.asList(proxyServers.split(",")));
        server.start();
    }
}
